import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yang
 * Date: 2022-04-29
 * Time: 22:30
 */
public class Main {
    public static void main(String[] args) {
        int a = 1;
        int b = 1;
        int num;
        Scanner scan = new Scanner(System.in);
        num = scan.nextInt();
        if(num<3){
            System.out.println(1);
        }
        else{
            for (int i = 3; i <= num; i++) {
                int tmp = a + b;
                a = b;
                b = tmp;
            }
            System.out.println(b);
        }

    }
}
